/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 jfinal app. jfapp Group.
 */

package app.models.activity;

import com.github.sog.annotation.TableBind;
import com.github.sog.plugin.sqlinxml.SqlKit;
import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * <p>
 * The table ol_brand_share mapping model.
 * </p>
 */
@TableBind(tableName = "ol_brand_activity_share")
public class BrandActivityShare extends Model<BrandActivityShare> {

    /**
     * The public dao.
     */
    public static final  BrandActivityShare dao = new BrandActivityShare();

    private static final long serialVersionUID = 1831570547372244893L;


    public List<BrandActivityShare> list() {
        return find(SqlKit.sql("brandactivityshare.list"));
    }

    /**
     * 根据会员ID查询分享信息
     * @param mid
     * @return
     */
    public List<BrandActivityShare> findByMemberId(int mid) {
        return dao.find(SqlKit.sql("brandactivityshare.findByMemberId"), mid);
    }
}